package com.design.singleton;

/**
 * @Author: ChengLei.Liu
 * @Date: 2020-06-05 13:16
 * @Description: 单例模式(饿汉式)
 *  通过静态常量实现
 */
public class Singleton01 {

    private final static Singleton01 INSTANCE = new Singleton01();

    private Singleton01(){
    }

    /**
     * 对外暴露一个返回对象实例的静态方法
     * @return
     */
    public static Singleton01 getInstance(){
        return INSTANCE;
    }
}
